*============================================================*
set more off
*============================================================*

*=============================================================================*
*=== Table 5 =================================================================*
*=============================================================================*

use Table5.dta,clear



gen phase12 = 0

replace phase12 = 1 if phase <=2

preserve
keep if year == 2000

mean numberofpopulationphysician numberofhospitals numberofpopulationpatientbed numberofnewoutpatients numberofinpatients if phase12 == 1
mean numberofpopulationphysician numberofhospitals numberofpopulationpatientbed numberofnewoutpatients numberofinpatients if phase12 == 0

reg numberofpopulationphysician phase12, vce(r)
reg numberofhospitals phase12, vce(r)
reg numberofpopulationpatientbed phase12, vce(r)
reg numberofnewoutpatients phase12, vce(r)
reg numberofinpatients phase12, vce(r)


restore 
preserve

keep if year == 2004
mean numberofpopulationphysician numberofhospitals numberofpopulationpatientbed numberofnewoutpatients numberofinpatients if phase12 == 1
mean numberofpopulationphysician numberofhospitals numberofpopulationpatientbed numberofnewoutpatients numberofinpatients if phase12 == 0

reg numberofpopulationphysician phase12, vce(r)
reg numberofhospitals phase12, vce(r)
reg numberofpopulationpatientbed phase12, vce(r)
reg numberofnewoutpatients phase12, vce(r)
reg numberofinpatients phase12, vce(r)


restore 

reg numberofpopulationphysician i.phase12##i.year, vce(r)
reg numberofhospitals i.phase12##i.year, vce(r)
reg numberofpopulationpatientbed i.phase12##i.year, vce(r)
reg numberofnewoutpatients i.phase12##i.year, vce(r)
reg numberofinpatients i.phase12##i.year, vce(r)















